<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Shop Car',
    'defaultController'=>'index',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
        'application.components.behaviors.*',
        'application.models.local.*',
        'application.models.settings.*',
        'application.models.files.*',
        'application.components.widgets.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'admin',
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('192.168.0.29','::1'),
		),
        'slider',
        'admin',
	),

	// application components
	'components'=>array(
        'url'=>array(
            'class'=>'application.components.Url',
        ),
        'user'=>array(
            'class'=>'application.components.WebUser',
            'allowAutoLogin'=>true,
            'loginUrl'=>array('admin/account/login'),
        ),
        'request'=>array(
            'enableCsrfValidation'=>false,
            'class'=>'HttpRequest',
        ),
        'urlManager'=>array(
            'class'=>'UrlManager',
        ),
        'cart'=>array(
            'class'=>'ext.Cart',
        ),
        'notification'=>array(
            'class'=>'ext.Notification',
        ),
        'file'=>array(
            'class'=>'ext.fileExt.FileExt',
            'imageClass'=>array(
                'class'=>'ext.fileExt.classes.ImageClass',
                'thumbs'=>array(
                    'mik'=>array('width'=>25,'height'=>25),
                    'min'=>array('width'=>64,'height'=>64),
                    'sm'=>array('width'=>80,'height'=>80),
                    'mid'=>array('width'=>109,'height'=>68),
                    'big'=>array('width'=>710,'height'=>308),
                    'wb'=>array('width'=>1100,'height'=>460),
                    'hug'=>array('width'=>2500,'height'=>2500),
                ),
            ),
        ),

		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/

        /*
		'db'=>array(
			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
        */
		// uncomment the following to use a MySQL database

		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=shopcar',
			'emulatePrepare' => true,
			'username' => 'shopcar',
			'password' => 'shopcar',
			'charset' => 'utf8',
		),
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'index/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
        'salt'=>'yf798kdd9LLKm8uI776jhGJnj34Yf',
        'elementsPerPage'=>15,
        'uploadImagePath'=>'image/uploaded/',
	),
);